//
//  Home_DetailUIVC.m
//  HappyRent
//
//  Created by CoderYee on 2017/4/7.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "Home_DetailUIVC.h"
#import "Home_DetailHeaderView.h"//headerView
#import "Home_DetailMulItem_TableCell.h"
#define KHome_DetailHeaderHeight   kMainScreenWidth*0.5+60



@interface Home_DetailUIVC ()

@end

@implementation Home_DetailUIVC

-(void)addOwnViews{
    
    [super addOwnViews];
    
    [self addTableHeaderView];
}
-(void)configOwnViews{
    
    [super configOwnViews];
    
    self.tableView.frame=CGRectMake(0, 0, kMainScreenWidth, KcontentViewHeight-KNavigationBarHeight);
    
}
-(void)registerCellClass{
    
    [super registerCellClass];
    
    [self.tableView registerClass:[Home_DetailMulItem_TableCell class] forCellReuseIdentifier:[Home_DetailMulItem_TableCell cellIdentifier]];
}

#pragma mark 添加头部视图
-(void)addTableHeaderView{
    
    Home_DetailHeaderView *headerView=[[Home_DetailHeaderView  alloc] initWithFrame:CGRectMake(0, 0, kMainScreenWidth,KHome_DetailHeaderHeight )];
    
    self.tableView.tableHeaderView=headerView;
    
}
//需要根据后台返回的数据判断多少行
#pragma mark  UITableViewDelegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 20;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    BaseTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:[BaseTableViewCell cellIdentifier] forIndexPath:indexPath];
    cell.textLabel.textColor=kBlackColor;
    cell.textLabel.text=@"yeeOS";
    return cell;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 44;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
}

@end
